package edu.strategy.single.defaults;

import java.awt.Color;

import robocode.AdvancedRobot;
import robocode.Event;
import robocode.TurnCompleteCondition;
import edu.strategy.single.Single;

public class CrazyDefaultStrategy extends Single{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public CrazyDefaultStrategy(AdvancedRobot advancedRobot) {
		super(advancedRobot);
	}
	public void prepare(){
		super.getAdvancedRobot().setBodyColor(new Color(0, 200, 0));
	}
	
	@Override
	public void work() {
		super.used();
		super.getAdvancedRobot().scan();
		super.getAdvancedRobot().scan();
		//super.getAdvancedRobot().setAhead(40000);
		super.getAdvancedRobot().ahead(40000);
		//super.getAdvancedRobot().setTurnRight(90);
		super.getAdvancedRobot().turnRight(90);
		//super.getAdvancedRobot().waitFor(new TurnCompleteCondition(super.getAdvancedRobot()));
		super.getAdvancedRobot().setTurnLeft(180);
		super.getAdvancedRobot().turnLeft(180);
		//super.getAdvancedRobot().waitFor(new TurnCompleteCondition(super.getAdvancedRobot()));
		//super.getAdvancedRobot().setTurnRight(180);
		super.getAdvancedRobot().turnRight(80);
		//super.getAdvancedRobot().waitFor(new TurnCompleteCondition(super.getAdvancedRobot()));
	}
	

	@Override
	public void work(Event e) {
		work();
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return "CrazyDefaultStrategy";
	}
}
